import { useSelector, useDispatch } from 'react-redux'
import { add, addAync } from '../store/action'
export default function Man() {
  const count = useSelector((state) => state)
  const dispatch = useDispatch()
  return (
    <div>
      <h3>男人组件</h3>
      <div>金钱:{count}</div>
      <button onClick={() => dispatch(add(100))}>搬砖:100</button>
      <button onClick={() => dispatch(addAync(100000000))}>创业:10000w</button>
    </div>
  )
}
